/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-02-07
 * Time: 10:10
 */
public class test {

}
class Solution {
    public int firstUniqChar(String s) {if (s.length()==0){
        return -1;
    }
int[] arry=new int[26];
        for (int i = 0; i < s.length(); i++) {
            arry[s.charAt(i)-97]++;
        }
        for (int i = 0; i < s.length(); i++) {
            if(arry[s.charAt(i)-97]==1){
                return i;
            }
        }
        return -1;
    }
}